/*     */ package com.umeng.newxp.view;
/*     */ 
/*     */ import android.app.Dialog;
/*     */ import android.content.Context;
/*     */ import android.text.TextUtils;
/*     */ import android.view.View;
/*     */ import android.webkit.WebSettings;
/*     */ import android.webkit.WebView;
/*     */ import com.umeng.common.Log;
/*     */ import com.umeng.common.b;
/*     */ import com.umeng.newxp.Promoter;
/*     */ import com.umeng.newxp.common.ExchangeConstants;
/*     */ import com.umeng.newxp.controller.ExchangeDataService;
/*     */ import java.util.List;
/*     */ import org.json.JSONException;
/*     */ import org.json.JSONObject;
/*     */ 
/*     */ public class S
/*     */ {
/*  38 */   private static final String a = S.class.getName();
/*  39 */   private Boolean b = Boolean.valueOf(false);
/*  40 */   private boolean c = false;
/*     */   private FloatDialogConfig d;
/*     */   private Context e;
/*     */   private Dialog f;
/*     */ 
/*     */   public S(FloatDialogConfig paramFloatDialogConfig, Context paramContext, Dialog paramDialog)
/*     */   {
/*  47 */     this.d = paramFloatDialogConfig;
/*  48 */     this.e = paramContext;
/*  49 */     this.f = paramDialog;
/*     */   }
/*     */ 
/*     */   protected View a(List<Promoter> paramList, ExchangeDataService paramExchangeDataService) {
/*  53 */     GridTemplateConfig localGridTemplateConfig = new GridTemplateConfig();
/*  54 */     GridTemplate localGridTemplate = new GridTemplate(paramList, paramExchangeDataService, this.e, localGridTemplateConfig);
/*  55 */     return localGridTemplate.contentView;
/*     */   }
/*     */ 
/*     */   protected View b(List<Promoter> paramList, ExchangeDataService paramExchangeDataService) {
/*  59 */     w localw = new w(this.e, paramExchangeDataService, paramList);
/*  60 */     return localw.a;
/*     */   }
/*     */ 
/*     */   protected P c(List<Promoter> paramList, ExchangeDataService paramExchangeDataService)
/*     */   {
/*  70 */     P localP = new P(this.e);
/*     */ 
/*  72 */     Promoter localPromoter = (paramList == null) || (paramList.size() == 0) ? null : (Promoter)paramList.get(0);
/*  73 */     boolean bool = localP.a(paramExchangeDataService, localPromoter, new T(this));
/*     */ 
/*  93 */     if (!bool) {
/*  94 */       Log.b(ExchangeConstants.LOG_TAG, "float-window use FImageView style.but set no match promoter.[" + (
/*  95 */         localPromoter == null ? "promoter is null(may be promoter has filtered by installed-filter.)" : 
/*  96 */         new StringBuilder("promoter.img =").append(localPromoter.img).toString()) + "]");
/*     */     }
/*  98 */     return localP;
/*     */   }
/*     */ 
/*     */   protected WebView a()
/*     */   {
/* 103 */     WebView localWebView = new WebView(this.e);
/* 104 */     b(localWebView);
/* 105 */     return localWebView;
/*     */   }
/*     */ 
/*     */   private void b(WebView paramWebView)
/*     */   {
/* 110 */     paramWebView.setScrollBarStyle(0);
/* 111 */     WebSettings localWebSettings = paramWebView.getSettings();
/* 112 */     localWebSettings.setCacheMode(1);
/*     */ 
/* 114 */     localWebSettings.setJavaScriptEnabled(true);
/* 115 */     localWebSettings.setSupportZoom(false);
/* 116 */     localWebSettings.setUseWideViewPort(true);
/* 117 */     paramWebView.setInitialScale(1);
/*     */ 
/* 119 */     paramWebView.setWebChromeClient(new U(this));
/*     */ 
/* 134 */     paramWebView.setWebViewClient(new V(this, paramWebView));
/*     */   }
/*     */ 
/*     */   protected void a(WebView paramWebView)
/*     */   {
/* 166 */     JSONObject localJSONObject = null;
/*     */     try {
/* 168 */       localJSONObject = c();
/*     */     } catch (JSONException localJSONException) {
/*     */     }
/* 171 */     Log.c(a, "send device info " + localJSONObject.toString());
/* 172 */     paramWebView.loadUrl("javascript:uGap.setDeviceInfo(" + localJSONObject + ")");
/*     */   }
/*     */ 
/*     */   private JSONObject c() throws JSONException {
/* 176 */     JSONObject localJSONObject = new JSONObject();
/* 177 */     String str1 = b.g(this.e);
/* 178 */     if (!TextUtils.isEmpty(str1)) localJSONObject.put("device_id", str1);
/*     */ 
/* 180 */     String str2 = b.r(this.e);
/* 181 */     if (!TextUtils.isEmpty(str2)) localJSONObject.put("mc", 
/* 182 */         str2);
/*     */ 
/* 184 */     return localJSONObject;
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.newxp.view.S
 * JD-Core Version:    0.6.2
 */